package com.enjoy.rpc.server;

import com.enjoy.rpc.service.SendSms;
import com.enjoy.rpc.service.impl.SendSmsImpl;

import java.io.IOException;

/**
 * Created by HP on 2019/7/3.
 */
public class SmsServer {
    public static void main(String[] args) {
        new Thread(new Runnable() {
            @Override
            public void run() {
                RpcServerFrame smsServer=new RpcServerFrame(9188);
                try {
                //注册服务
                RegisServer.registerService(SendSms.class.getName(),"127.0.0.1:9188");
                smsServer.registerService(SendSms.class.getName(), SendSmsImpl.class);
                    smsServer.startService();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }).start();
    }
}
